/*
 * Copyright © 2018 Cask Data, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

@import '../../../../styles/variables.scss';

$running: $blue-02;
$completed: $green-02;
$failed: $red-02;
$killed: $grey-04;
$border-color: $grey-03;

$caret-width: 25px;

.status-selector {
  .status-viewer {
    cursor: pointer;
    border-bottom: 1px solid $border-color;
    margin-right: 25px;

    .status-text,
    .caret-dropdown {
      display: inline-block;
      vertical-align: top;
    }

    .status-text {
      width: calc(100% - #{$caret-width});
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .caret-dropdown {
      width: $caret-width;
      text-align: center;
    }
  }

  .status-selector-popover {
    .popper {
      text-align: left;
      padding: 15px;
      z-index: 1;

      .option {
        line-height: 25px;

        span { vertical-align: middle; }
      }

      .action {
        margin-top: 15px;
      }

      .running { color: $running; }
      .failed { color: $failed; }
      .completed { color: $completed; }
      .killed { color: $killed; }
    }
  }
}
